1. Field of the Invention
The invention relates to digital video, and more particularly, to decoding a coded video bit stream having both macroblocks encoded using block-matching motion compensation and macroblocks encoded using global motion compensation.
2. Description of the Prior Art
Full-motion video displays using analog video signals have long been available in the form of television. With recent advances in computer processing capabilities and affordability, full-motion video displays using digital video signals are becoming more widely available. Digital video systems provide significant improvements over conventional analog video systems in creating, modifying, transmitting, storing, and playing full-motion video sequences.
However, the amounts of raw digital information included in video sequences are massive. Storage and transmission of these amounts of video information is infeasible with conventional personal computer equipment. Consider, for example, a digitized form of a relatively low resolution VHS image format having a 320×480 pixel resolution. A full-length motion picture of two hours in duration at this resolution corresponds to 100 gigabytes of digital video information. By comparison, conventional CD-ROM disks have capacities of about 0.7 gigabytes, and DVD disks have capacities of up to 8 gigabytes.
To address the limitations in storing and transmitting such massive amounts of digital video information, various video compression standards or processes have been established, including MPEG-1, MPEG-2, MPEG-4, and H.26X. These video compression techniques utilize still image compression techniques, referred to as intraframe correlation, of the individual image frames as well as similarities between successive image frames, referred to as interframe correlation, to encode the digital video information and provide a high compression ratio.
Block-matching (BM) motion compensation is a technique well known in the prior art for encoding digital video information. If an image sequence shows moving objects, then their motion within the sequence can be used to create a motion vector for a particular block containing the moving object, also referred to as a macroblock. This motion vector can be used to predict where the macroblock will be later in the sequence. Instead of transmitting a new image, the motion vectors for macroblocks containing the moving objects can be sent instead. Block-matching motion compensation greatly reduces the data that must be transmitted for image sequences containing moving objects. However, when the whole image is panning, expanding, contracting, or turning, the motion vectors of all of macroblocks must be transmitted, greatly decreasing the coding efficiency. To solve this problem, global motion compensation (GMC) techniques are well known in the prior art, such as the “sprite” coding techniques used in MPEG-4 (i.e. ISO/IEC 14496-2). These global motion compensation techniques take into account global image changes between a previous frame and the current frame. Global motion parameters associated with each frame are used to specify individual motion vectors for all pixels in each macroblocks encoded using global motion compensation. In this way, only one set of global motion parameters is required for each frame, increasing the encoding efficiency for video sequences having global image changes.
FIG. 1 shows a typical video decoder 100 according to the prior art as disclosed in U.S. Pat. No. 6,483,877. The video decoder 100 receives a incoming coded video bit stream 102 that is separated through a demultiplexer 104 into quantized discrete cosine transform (DCT) coefficients 106, macroblock motion vector and global motion parameters 108, and an intraframe/interframe distinction flag 110. The quantized DCT coefficient 106 is decoded into an error image 116 through an inverse quantizer 112 and an inverse DCT processor 114. An output image 118 of an interframe/intraframe switching unit 120 is added to the error image 116 through an adder 122 to form a reconstructed image 124.
The interframe/intraframe switching unit 120 switches its output 118 according to the interframe/intraframe coding distinction flag 110. A predicted image synthesizer 126 synthesizes a predicted image 128 that is used for executing the interframe coding. The predicted image synthesizer 126 performs motion compensation operation and fetches prediction blocks from at least one decoded image 130, which is a previously decoded frame stored in a frame memory 128. The predicted image synthesizer 126 performs either block-matching motion compensation or global motion compensation according to the encoding type used for a particular macroblock. In the case of intraframe coding, the interframe/intraframe switching unit 120 outputs the “0” signal 132 and the output of the predicted image synthesizer 126 is not used.
FIG. 2 shows a more detailed block diagram of the predicted image synthesizer 126 of FIG. 1 according to the prior art. The predicted image synthesizer 126 processes global motion compensation and block matching motion compensation in parallel. The macroblock motion vector and global motion parameters 108 are input to a demultiplexer 202, which provides global motion parameters 204, a macroblock motion vector 206, and a selection signal 208 specifying block matching/global motion compensation to a GMC image synthesizer 210, a BM image synthesizer 212, and a switch 214, respectively. The BM image synthesizer 212 synthesizes the predicted image for blocks that are encoded using block-matching motion compensation, and the GMC image synthesizer 210 synthesizes the predicted image for blocks that are encoded using global motion compensation. The respective predicted image data 216 and 218 are output to the switch 214, which selects one of these signals according to the selection signal 208, received from the demultiplexer 202. The predicted image 128 is then output to the switching unit 120, as shown in FIG. 1.
As can be seen from the above description, video decoders supporting both block-matching motion compensation and global motion compensation require the use of two different image synthesizers. A first image synthesizer 212 is used for block-matching motion compensation, and a second image synthesizer 210 is used for global motion compensation. When processing blocks encoded using block-matching image compensation, the GMC image synthesizer 210 is idle. Likewise, when processing blocks encoded using global motion compensation, the BM image synthesizer 212 is idle. This non-optimal solution of requiring two image synthesizers increases the hardware complexity of the video decoder and results in a higher cost. It would be beneficial to combine the functionality of the GMC synthesizer 210 and the BM synthesizer 212 into an integrated unit.